package gemini.castor.ui.server.service.impl;

import gemini.basic.manager.DistributorManager;
import gemini.basic.model.Event;
import gemini.castor.ui.client.service.EventService;
import gemini.castor.ui.server.service.AbstractSingleService;

import java.util.List;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

public class EventServiceImpl extends
        AbstractSingleService<DistributorManager> implements
        EventService {

    @SuppressWarnings("unused")
	private final Log logger = LogFactory
            .getLog(EventServiceImpl.class);

	@Override
	public List<Event> getEventByDistributorCode(String code) {
		List<Event> result = duplicateExcludeFields(getServerManager().getEventByDistributorCode(code));
		return result;
	}

	@Override
	public Event saveOrUpdateEvent(Event event) {
		Event result = duplicateExcludeFields(getServerManager().saveOrUpdateEvent(event));
    	return result;
	}

	@Override
	public void deleteEvent(int id) {
			getServerManager().deleteEvent(id);
	}
}
